package jyj.springmvc.learning.bean;

/**
 * @Author 老顽固小可爱
 * @Date 2022/12/12 14:47
 * @Version 1.0
 */

import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.format.annotation.NumberFormat;

import java.math.BigDecimal;
import java.util.Date;

/**
 * @author C语言中文网
 */
public class Supermarket {
    private String name;

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date date;
    /**
     * 使用 @NumberFormat 注解格式化数值
     */
    @NumberFormat(style = NumberFormat.Style.CURRENCY)
    private BigDecimal money;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public BigDecimal getMoney() {
        return money;
    }

    public void setMoney(BigDecimal money) {
        this.money = money;
    }

    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    @Override
    public String toString() {
        return "Supermarket{" +
                "name='" + name + '\'' +
                ", date=" + date +
                ", money=" + money +
                '}';
    }
}
